package com.lry.basic.juc;

/**
 * @author:刘仁有
 * @desc:
 * @email:953506233@qq.com
 * @data:2019/8/6
 */
public class TestThreadLocal {
    static ThreadLocal<Integer> tl1 = new ThreadLocal(){
        @Override
        protected Integer initialValue() {
            return 1;
        }
    };

    static ThreadLocal<Integer> tl2 = new ThreadLocal(){
        @Override
        protected Integer initialValue() {
            return 2;
        }
    };

    public static void main(String[] args) {
//        threadLocal.set(1);
        System.out.println(tl1.get());
        System.out.println(tl2.get());
    }
}
